class HttpStatus:
    SUCCESS: int = 200
    FAIL: int = 500
    ERROR: int = 500
    NOT_FOUND: int = 404
    UNAUTHORIZED: int = 401

def success(msg, data=None):
    return {
        "code":HttpStatus.SUCCESS,
        "msg":msg,
        "data":data
    }

def fail(msg, data=None):
    return {
        "code":HttpStatus.FAIL,
        "msg":msg,
        "data":data
    }

def unauthorized():
    return {
        "code":HttpStatus.UNAUTHORIZED,
        "msg":"您没有操作权限",
        "data":None
    }